package com.nbcio.pm.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.nbcio.common.tenant.core.TenantEntity;
import com.nbcio.pm.domain.vo.PmTeamProjectVo;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;

/**
 * 团队-项目关联对象 pm_team_project
 *
 * @author nbacheng
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("pm_team_project")
@AutoMapper(target = PmTeamProjectVo.class, reverseConvertGenerate = false)
public class PmTeamProject extends TenantEntity implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "id")
    private Long id;

    /**
     * 团队ID
     */
    @TableField("team_id")
    private Long teamId;

    /**
     * 项目ID
     */
    @TableField("project_id")
    private Long projectId;

    /**
     * 是否主要团队（0否 1是）
     */
    @TableField("is_primary")
    private Boolean isPrimary;

    // 关联字段（非数据库字段）
    @TableField(exist = false)
    private String teamName;

    @TableField(exist = false)
    private String projectName;
}
